package com.my.study.hutool.core;

import com.my.study.utils.Money;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author: yidujun
 * @create: 2021/06/30 11:18
 */
public class TestBuilder {

    public static void main(String[] args) {
        Money m1 = new Money("363.3", 87.3);
        Money m2 = new Money(null, 837.3);
        Money m3 = new Money("343.3", 34.3);
        Money m4 = new Money(null, 34.3);
        Money m5 = new Money("363.3", 34.3);
        List<Money> list = new ArrayList<>(Arrays.asList(m1, m2, m3, m4, m5));
        list.sort(Money::compareTo);
        Collections.reverse(list);
        System.out.println(list);

    }

}
